using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BlurGhost : MonoBehaviour
{
    public SpriteRenderer SR;

    // Start is called before the first frame update
    void Start()
    {
        SR.color = new Color(1f, 1f, 1f, 0f);

        StartCoroutine(EffectCoroutine());
    }

    IEnumerator EffectCoroutine()
    {
        SR.DOFade(1f, 0.1f);
        yield return new WaitForSeconds(0.2f);

        SR.DOFade(0f, 0.1f);
        yield return new WaitForSeconds(0.1f);


        Destroy(gameObject);
    }
}
